package com.southminority.ethnic.controller.contact.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.southminority.ethnic.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 合作申请文件VO
 * 
 * @author SouthMinority
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "合作申请文件视图对象")
public class CooperationFileVO extends BaseVO {

    /**
     * 合作文件ID
     */
    @Schema(description = "合作文件ID", example = "1")
    private Long id;

    /**
     * 文件标题
     */
    @Schema(description = "文件标题", example = "项目合作申请表", required = true, maxLength = 200)
    private String title;

    /**
     * 文件描述
     */
    @Schema(description = "文件描述", example = "南方少数民族语言信息化实验室项目合作申请表模板")
    private String description;

    /**
     * 文件类型：cooperation_form-合作申请表
     */
    @Schema(description = "文件类型", example = "cooperation_form", 
            allowableValues = {"cooperation_form"}, required = true)
    private String fileType;

    /**
     * 文件类型显示名称
     */
    @Schema(description = "文件类型显示名称", example = "合作申请表", accessMode = Schema.AccessMode.READ_ONLY)
    private String fileTypeDisplay;

    /**
     * 文件URL
     */
    @Schema(description = "文件URL", example = "http://example.com/files/cooperation_form.pdf", required = true)
    private String fileUrl;

    /**
     * 原始文件名
     */
    @Schema(description = "原始文件名", example = "项目合作申请表.pdf", required = true, maxLength = 200)
    private String fileName;

    /**
     * 文件大小（字节）
     */
    @Schema(description = "文件大小（字节）", example = "1024000", minimum = "0")
    private Long fileSize;

    /**
     * 文件大小显示（如：1.2MB）
     */
    @Schema(description = "文件大小显示", example = "1.0MB", accessMode = Schema.AccessMode.READ_ONLY)
    private String fileSizeDisplay;

    /**
     * 文件格式：pdf/doc/docx等
     */
    @Schema(description = "文件格式", example = "pdf", 
            allowableValues = {"pdf", "doc", "docx", "xls", "xlsx"})
    private String fileFormat;

    /**
     * 版本号
     */
    @Schema(description = "版本号", example = "v1.0", maxLength = 50)
    private String version;

    /**
     * 下载次数
     */
    @Schema(description = "下载次数", example = "125", minimum = "0", accessMode = Schema.AccessMode.READ_ONLY)
    private Integer downloadCount;

    /**
     * 排序
     */
    @Schema(description = "排序", example = "1", minimum = "0")
    private Integer sortOrder;

    /**
     * 是否默认文件：1-是，0-否
     */
    @Schema(description = "是否默认文件", example = "1", allowableValues = {"0", "1"})
    private Integer isDefault;

    /**
     * 是否默认文件（布尔值）
     */
    @Schema(description = "是否默认文件（布尔值）", example = "true", accessMode = Schema.AccessMode.READ_ONLY)
    private Boolean defaultFile;

    /**
     * 状态：1-启用，0-禁用，-1-已删除
     */
    @Schema(description = "状态", example = "1", allowableValues = {"1", "0", "-1"})
    private Integer status;

    /**
     * 状态显示名称
     */
    @Schema(description = "状态显示名称", example = "启用", 
            allowableValues = {"启用", "禁用", "已删除"}, accessMode = Schema.AccessMode.READ_ONLY)
    private String statusDisplay;

    /**
     * 下载链接
     */
    @Schema(description = "下载链接", example = "/api/contact/cooperation-files/download/1", 
            accessMode = Schema.AccessMode.READ_ONLY)
    private String downloadUrl;
} 